using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._DataManagementTools._LASDataset
{
    /// <summary>
    /// <para>Build LAS Dataset Pyramid</para>
    /// <para>Constructs or updates a LAS dataset display cache, which optimizes its rendering performance.</para>
    /// <para>构建或更新 LAS 数据集显示缓存，以优化其渲染性能。</para>
    /// </summary>    
    [DisplayName("Build LAS Dataset Pyramid")]
    public class BuildLasDatasetPyramid : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public BuildLasDatasetPyramid()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_las_dataset">
        /// <para>Input LAS Dataset</para>
        /// <para>The LAS dataset to process.</para>
        /// <para>要处理的 LAS 数据集。</para>
        /// </param>
        public BuildLasDatasetPyramid(object _in_las_dataset)
        {
            this._in_las_dataset = _in_las_dataset;
        }
        public override string ToolboxName => "Data Management Tools";

        public override string ToolName => "Build LAS Dataset Pyramid";

        public override string CallName => "management.BuildLasDatasetPyramid";

        public override List<string> AcceptEnvironments => ["scratchWorkspace", "workspace"];

        public override object[] ParameterInfo => [_in_las_dataset, _point_selection_method.GetGPValue(), _class_codes_weights, _derived_las_dataset];

        /// <summary>
        /// <para>Input LAS Dataset</para>
        /// <para>The LAS dataset to process.</para>
        /// <para>要处理的 LAS 数据集。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input LAS Dataset")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_las_dataset { get; set; }


        /// <summary>
        /// <para>Point Selection Method</para>
        /// <para><xdoc>
        ///   <para>Specifies how the point in each binned region will be selected to construct the pyramid. This parameter is disabled if the LAS dataset contains a pyramid.</para>
        ///   <bulletList>
        ///     <bullet_item>Lowest Point—The point with the lowest z-value will be selected.</bullet_item><para/>
        ///     <bullet_item>Highest Point—The point with the highest z-value will be selected.</bullet_item><para/>
        ///     <bullet_item>Closest to Center—The point that is closest to the center of the binned region will be selected.</bullet_item><para/>
        ///     <bullet_item>Class Codes and Weights—The point with the highest weight value will be selected.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定如何选择每个分箱区域中的点来构造金字塔。如果 LAS 数据集包含金字塔，则禁用此参数。</para>
        ///   <bulletList>
        ///     <bullet_item>最低点 - 将选择具有最低 z 值的点。</bullet_item><para/>
        ///     <bullet_item>最高点 - 将选取具有最高 z 值的点。</bullet_item><para/>
        ///     <bullet_item>最接近中心—将选取最接近图格区域中心的点。</bullet_item><para/>
        ///     <bullet_item>类代码和权重—将选取具有最高权重值的点。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Point Selection Method")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _point_selection_method_value _point_selection_method { get; set; } = _point_selection_method_value._CLOSEST_TO_CENTER;

        public enum _point_selection_method_value
        {
            /// <summary>
            /// <para>Closest to Center</para>
            /// <para>Closest to Center—The point that is closest to the center of the binned region will be selected.</para>
            /// <para>最接近中心—将选取最接近图格区域中心的点。</para>
            /// </summary>
            [Description("Closest to Center")]
            [GPEnumValue("CLOSEST_TO_CENTER")]
            _CLOSEST_TO_CENTER,

            /// <summary>
            /// <para>Class Codes and Weights</para>
            /// <para>Class Codes and Weights—The point with the highest weight value will be selected.</para>
            /// <para>类代码和权重—将选取具有最高权重值的点。</para>
            /// </summary>
            [Description("Class Codes and Weights")]
            [GPEnumValue("CLASS_CODE")]
            _CLASS_CODE,

            /// <summary>
            /// <para>Lowest Point</para>
            /// <para>Lowest Point—The point with the lowest z-value will be selected.</para>
            /// <para>最低点 - 将选择具有最低 z 值的点。</para>
            /// </summary>
            [Description("Lowest Point")]
            [GPEnumValue("Z_MIN")]
            _Z_MIN,

            /// <summary>
            /// <para>Highest Point</para>
            /// <para>Highest Point—The point with the highest z-value will be selected.</para>
            /// <para>最高点 - 将选取具有最高 z 值的点。</para>
            /// </summary>
            [Description("Highest Point")]
            [GPEnumValue("Z_MAX")]
            _Z_MAX,

        }

        /// <summary>
        /// <para>Input Class Codes and Weights</para>
        /// <para>The weights assigned to each class code that determine which points are retained in each thinning region. This parameter is only enabled when the Class Code Weights option is specified in the Point Selection Method parameter. The class code with the highest weight will be retained in the thinning region. If two class codes with the same weight exist in a given thinning region, the class code with the smallest point source ID will be retained.</para>
        /// <para>分配给每个类代码的权重，用于确定在每个细化区域中保留哪些点。仅当在“点选择方法”参数中指定了“类代码权重”选项时，才会启用此参数。具有最高权重的类代码将保留在变薄区域中。如果给定的细化区域中存在两个权重相同的类代码，则将保留具有最小点源 ID 的类代码。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Class Codes and Weights")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _class_codes_weights { get; set; } = null;


        /// <summary>
        /// <para>Output LAS Dataset</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output LAS Dataset")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _derived_las_dataset { get; set; }


        public BuildLasDatasetPyramid SetEnv(object scratchWorkspace = null, object workspace = null)
        {
            base.SetEnv(scratchWorkspace: scratchWorkspace, workspace: workspace);
            return this;
        }

    }

}